package com.blacksee.bluetoothpoker.ui;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.blacksee.bluetoothpoker.logic.Hand;
import com.blacksee.bluetoothpoker.logic.HandEvaluator;

public class PokerMidlet extends MIDlet {

	PokerCanvas mainCanvas;
	
	public PokerMidlet(){
		mainCanvas = new PokerCanvas(this);
	}
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub
	}

	protected void pauseApp() {
		// TODO Auto-generated method stub
	}

	protected void startApp() throws MIDletStateChangeException {
		//try{
			Display.getDisplay(this).setCurrent(mainCanvas);
			mainCanvas.runGame();
		//}catch(Exception e){
		//	e.printStackTrace();
		//}
		/*Hand hand1 = new Hand("Kc 8c 9c Tc Jc Qc Ac");
	       Hand hand2 = new Hand("Kc 8c 9c Td Jc Qc Ad");

	       HandEvaluator handEval = new HandEvaluator();

	       System.out.println(handEval.getBest5CardHand(hand1));
	       System.out.println(handEval.getBest5CardHand(hand2));

	       System.out.println(HandEvaluator.rankHand(hand1));
	       System.out.println(HandEvaluator.rankHand(hand2));

	       System.out.println(HandEvaluator.nameHand(hand1));
	       System.out.println(HandEvaluator.nameHand(hand2));*/

	}

}
